using System;
using NHibernate.Criterion;

namespace FwkLight.Domain.Fetching
{
  public class FetchingFilterLe: FetchingFilter
  {
    public FetchingFilterLe(string propertyName, object value, IFetchingPart parent) : base(propertyName, value, parent)
    {
    }

    public override void ApplyFilterOn(DetachedCriteria criteria)
    {
      criteria.Add(Restrictions.Le(Parent.Alias + "." + PropertyName, Value));
    }
  }
}